<!doctype html>
<html class="no-js">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>叮当童趣-微信支付</title>
    <!-- Set render engine for 360 browser -->
    <meta name="renderer" content="webkit">
    <!-- No Baidu Siteapp-->
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <!-- Add to homescreen for Chrome on Android -->
    <meta name="mobile-web-app-capable" content="yes">
    <!-- Add to homescreen for Safari on iOS -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-title" content="Amaze UI" />
    <!-- Tile icon for Win8 (144x144 + tile color) -->
    <meta name="msapplication-TileColor" content="#0e90d2">
    <!-- SEO: If your mobile URL is different from the desktop URL, add a canonical link to the desktop page https://developers.google.com/webmasters/smartphone-sites/feature-phones -->
    <!--
  <link rel="canonical" href="http://www.example.com/">
  -->
    <link rel="stylesheet" href="__PUBLIC__/assets/css/amazeui.min.css">
    <link rel="stylesheet" href="__PUBLIC__/assets/css/app.css">
    <link rel="stylesheet" href="__PUBLIC__/assets/css/index.css">
    <!--必要样式-->
    <style>
        .gd-pay-money{
            margin: 110px 0 70px 0px;
        }
        .gd-pay-money span{
            font-size: 103px;color: #E8251E;display: block;
        }
        .gd-pay-big-button{
            border: none;border-radius: 10px;width: 200px;line-height: 60px;font-size: 29px;color: #FFF;background: #E8251E;
        }
    </style>
</head>

<body>

<div class="am-g am-text-center gd-pay-money">
        <span>{$money}</span>
</div>

<div class="am-g am-text-center">
    <button class="gd-pay-big-button" onclick="docallpay()">立即支付</button>
</div>
<div class="am-g am-text-center am-margin-top-lg">
    <a href="__APP__/Home/">
    <button class="gd-pay-big-button" >回到主页</button>
    </a>
    <!--<a href="__APP__/Home/" >-->
    <!--<button class="gd-pay-big-button"  onclick="window.location.href='__APP__/Home/'">回到主页111</button>-->
    <!--</a>-->
</div>

<!--[if (gte IE 9)|!(IE)]><!-->
<script src="__PUBLIC__/assets/js/jquery.min.js"></script>
<script src="__PUBLIC__/assets/js/angular.min.js"></script>
<script src="__PUBLIC__/assets/js/amazeui.min.js"></script>
<script type="text/javascript">
        //调用微信JS api 支付
        function jsApiCall()
        {
            WeixinJSBridge.invoke(
                'getBrandWCPayRequest',
                {$jsApiParameters},
                function(res){
                    WeixinJSBridge.log(res.err_msg);
                        window.location.href='__APP__/Home/';
                    alert(res.err_code+res.err_desc+res.err_msg);
                    console.info(res.return_code);
                    if(res.return_code == "SUCCESS"){
                        window.location.href='__APP__/Home/User/myCard';
                    }else{
                        window.location.href='__APP__/Home/';
                    }
                }
            );
        }

    function docallpay()
    {
        if (typeof WeixinJSBridge == "undefined"){
            if( document.addEventListener ){
                document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
            }else if (document.attachEvent){
                document.attachEvent('WeixinJSBridgeReady', jsApiCall);
                document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
            }
        }else{
            jsApiCall();
        }
    }
</script>
<script type="text/javascript">
    //获取共享地址
    function editAddress()
    {
        WeixinJSBridge.invoke(
            'editAddress',
            {$editAddress},
            function(res){
                var value1 = res.proviceFirstStageName;
                var value2 = res.addressCitySecondStageName;
                var value3 = res.addressCountiesThirdStageName;
                var value4 = res.addressDetailInfo;
                var tel = res.telNumber;

                //alert(value1 + value2 + value3 + value4 + ":" + tel);
            }
        );
    }

    window.onload = function(){
        if (typeof WeixinJSBridge == "undefined"){
            if( document.addEventListener ){
                document.addEventListener('WeixinJSBridgeReady', editAddress, false);
            }else if (document.attachEvent){
                document.attachEvent('WeixinJSBridgeReady', editAddress);
                document.attachEvent('onWeixinJSBridgeReady', editAddress);
            }
        }else{
            editAddress();
        }
    };




</script>


</body>
</html>

